<ul class="layui-menu">
    {if getCategory($top_parentid,'child')}
    {yzn module="cms" action="category" catid="$top_parentid" siteId="$siteId" cache="3600" order="listorder ASC" num="30" return="data"}
    {volist name="data" id="vo"}
    {if $vo['child']}
    <li class="layui-menu-item-group {if isset($catid) && in_array($catid,explode(',',$vo['arrchildid']))}layui-menu-item-down{else}layui-menu-item-up{/if}">
        <div class="layui-menu-body-title">{$vo.catname} <i class="layui-icon {if isset($catid) && in_array($catid,explode(',',$vo['arrchildid']))}layui-icon-up{else}layui-icon-down{/if}"></i></div>
        <ul>
            {yzn module="cms" action="category" catid="$vo['id']" siteId="$siteId" cache="3600" order="listorder ASC" num="10" return="data"}
            {foreach $data as $key=>$vo }
            <li  {if isset($catid) && in_array($catid,explode(',',$vo['arrchildid']))}class="layui-menu-item-checked"{/if}><a href="{$vo.url}" title="{$vo.catname}">{$vo.catname}</a></li>
            {/foreach}
            {/yzn}
        </ul>
    </li>
    {else}
    <li {if isset($catid) && in_array($catid,explode(',',$vo['arrchildid']))}class="layui-menu-item-checked"{/if}><div class="layui-menu-body-title"><a href="{$vo.url}">{$vo.catname}</a></div></li>
    {/if}
    {/volist}
    {/yzn}
    {else}
    <li class="layui-menu-item-checked"><div class="layui-menu-body-title"><a href="{$url}">{$catname}</a></div></li>
    {/if}
</ul>